<?php
//5! = 5 * 4 * 3 * 2 * 1;
//5! = 1 * 2 * 3 * 4 * 5;
$num = 1;
$fact = 1;
//$fact = $fact * ($num++ + 1);// 1*(1+1)-> 1*2
//$fact = $fact * ($num++ + 1);// 1*(1+1)-> 1*2
//$fact = $fact * ($num++ + 1);// 1*(1+1)-> 1*2
//$fact = $fact * ($num++ + 1);// 1*(1+1)-> 1*2
for ($i = 1; $i < 6 ; $i++) {
  $fact = $fact * ($num++ + 1);// 1*(1+1)-> 1*2
}
echo $fact;
